﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Runtime.Serialization;
using DTO;
using DAO;

using System.Collections;
namespace WcfServiceLibrary{
	[ServiceContract]
	public interface IDataContext{
		[OperationContract]
		void myString(string myconnecString);
		#region Bill
		// 0.them moi ; 1 Sua , 2 Delete
		[OperationContract(Name = "OnSubmitBill")]
		Boolean OnSubmit(ref Bill item,int t);
		//Lay thong tin tat ca du lieu cua Bill
		[OperationContract]
		List<Bill> GetAllBill();
		//Lay thong tin du lieu cua Bill theo id
		[OperationContract]
		Bill GetItemByIdBill(object id);
        // luu thong tin khach hang vao gio hang
        [OperationContract]
        void ShoppingCart(List<Monhang> list,Users item);
        
		#endregion
		#region Billdetail
		// 0.them moi ; 1 Sua , 2 Delete
		[OperationContract(Name = "OnSubmitBilldetail")]
		Boolean OnSubmit(Billdetail item,int t);
		//Lay thong tin tat ca du lieu cua Billdetail
		[OperationContract]
		List<Billdetail> GetAllBilldetail();
		//Lay thong tin du lieu cua Billdetail theo id
		[OperationContract]
		Billdetail GetItemByIdBilldetail(object id);
        //Lay danh sach san pham theo hoa don
        [OperationContract]
        List<Billdetail> getBillDetailByBillId(long billId);
        //Lay danh sach cart theo userId
        [OperationContract]
        List<Cart> getCartByUsers(long customersId);
		#endregion
		#region Cart
		// 0.them moi ; 1 Sua , 2 Delete
		[OperationContract(Name = "OnSubmitCart")]
		Boolean OnSubmit(ref Cart item,int t);
		//Lay thong tin tat ca du lieu cua Cart
		[OperationContract]
		List<Cart> GetAllCart();
		//Lay thong tin du lieu cua Cart theo id
		[OperationContract]
		Cart GetItemByIdCart(object id);
		#endregion
		#region Cartdetail
		// 0.them moi ; 1 Sua , 2 Delete
		[OperationContract(Name = "OnSubmitCartdetail")]
		Boolean OnSubmit(Cartdetail item,int t);
		//Lay thong tin tat ca du lieu cua Cartdetail
		[OperationContract]
		List<Cartdetail> GetAllCartdetail();
		//Lay thong tin du lieu cua Cartdetail theo id
		[OperationContract]
		Cartdetail GetItemByIdCartdetail(object id);
        //lay dang sach cac mat hang theo gio hang
        [OperationContract]
        List<Cartdetail> GetAllByCartDetailByCartId(long cartId);
        [OperationContract]
        List<Cart> getCartsByStatus(int Status);
		#endregion
		#region Category
		// 0.them moi ; 1 Sua , 2 Delete
		[OperationContract(Name = "OnSubmitCategory")]
		Boolean OnSubmit(Category item,int t);
		//Lay thong tin tat ca du lieu cua Category
		[OperationContract]
		List<Category> GetAllCategory();
		//Lay thong tin du lieu cua Category theo id
		[OperationContract]
		Category GetItemByIdCategory(object id);
		#endregion
		#region Customers
		// 0.them moi ; 1 Sua , 2 Delete
		[OperationContract(Name = "OnSubmitCustomers")]
		Boolean OnSubmit(Customers item,int t);
		//Lay thong tin tat ca du lieu cua Customers
		[OperationContract]
		List<Customers> GetAllCustomers();
		//Lay thong tin du lieu cua Customers theo id
		[OperationContract]
		Customers GetItemByIdCustomers(object id);
		#endregion
		#region Diaryproducts
		// 0.them moi ; 1 Sua , 2 Delete
		[OperationContract(Name = "OnSubmitDiaryproducts")]
		Boolean OnSubmit(Diaryproducts item,int t);
		//Lay thong tin tat ca du lieu cua Diaryproducts
		[OperationContract]
		List<Diaryproducts> GetAllDiaryproducts();
		//Lay thong tin du lieu cua Diaryproducts theo id
		[OperationContract]
		Diaryproducts GetItemByIdDiaryproducts(object id);
		#endregion
		#region Foreigncurrency
		// 0.them moi ; 1 Sua , 2 Delete
		[OperationContract(Name = "OnSubmitForeigncurrency")]
		Boolean OnSubmit(Foreigncurrency item,int t);
		//Lay thong tin tat ca du lieu cua Foreigncurrency
		[OperationContract]
		List<Foreigncurrency> GetAllForeigncurrency();
		//Lay thong tin du lieu cua Foreigncurrency theo id
		[OperationContract]
		Foreigncurrency GetItemByIdForeigncurrency(object id);
		#endregion
		#region Groupproducts
		// 0.them moi ; 1 Sua , 2 Delete
		[OperationContract(Name = "OnSubmitGroupproducts")]
		Boolean OnSubmit(Groupproducts item,int t);
		//Lay thong tin tat ca du lieu cua Groupproducts
		[OperationContract]
		List<Groupproducts> GetAllGroupproducts();
        [OperationContract]
        ArrayList GetAllAGroupproducts();
		//Lay thong tin du lieu cua Groupproducts theo id
		[OperationContract]
		Groupproducts GetItemByIdGroupproducts(object id);
		#endregion
		#region News
		// 0.them moi ; 1 Sua , 2 Delete
		[OperationContract(Name = "OnSubmitNews")]
		Boolean OnSubmit(News item,int t);
		//Lay thong tin tat ca du lieu cua News
		[OperationContract]
		List<News> GetAllNews();
		//Lay thong tin du lieu cua News theo id
		[OperationContract]
		News GetItemByIdNews(object id);
		#endregion
		#region Products
		// 0.them moi ; 1 Sua , 2 Delete
		[OperationContract(Name = "OnSubmitProducts")]
		Boolean OnSubmit(Products item,int t);
		//Lay thong tin tat ca du lieu cua Products
		[OperationContract]
		List<Products> GetAllProducts();
		//Lay thong tin du lieu cua Products theo id
		[OperationContract]
		Products GetItemByIdProducts(object id);
        //Lay nhung san pham thuoc nhom
        [OperationContract]
        List<Products> GetProductsBygroupId(long id);
		#endregion
		#region Quangcao
		// 0.them moi ; 1 Sua , 2 Delete
		[OperationContract(Name = "OnSubmitQuangcao")]
		Boolean OnSubmit(Quangcao item,int t);
		//Lay thong tin tat ca du lieu cua Quangcao
		[OperationContract]
		List<Quangcao> GetAllQuangcao();
		//Lay thong tin du lieu cua Quangcao theo id
		[OperationContract]
		Quangcao GetItemByIdQuangcao(object id);
		#endregion
		#region Usergroups
		// 0.them moi ; 1 Sua , 2 Delete
		[OperationContract(Name = "OnSubmitUsergroups")]
		Boolean OnSubmit(Usergroups item,int t);
		//Lay thong tin tat ca du lieu cua Usergroups
		[OperationContract]
		List<Usergroups> GetAllUsergroups();
		//Lay thong tin du lieu cua Usergroups theo id
		[OperationContract]
		Usergroups GetItemByIdUsergroups(object id);
		#endregion
		#region Users
		// 0.them moi ; 1 Sua , 2 Delete
		[OperationContract(Name = "OnSubmitUsers")]
		Boolean OnSubmit(Users item,int t);
		//Lay thong tin tat ca du lieu cua Users
		[OperationContract]
		List<Users> GetAllUsers();
		//Lay thong tin du lieu cua Users theo id
		[OperationContract]
		Users GetItemByIdUsers(object id);
        //Dang nhap
        [OperationContract]
        Users login(String userName,String password);
		#endregion
		#region Vendor
		// 0.them moi ; 1 Sua , 2 Delete
		[OperationContract(Name = "OnSubmitVendor")]
		Boolean OnSubmit(Vendor item,int t);
		//Lay thong tin tat ca du lieu cua Vendor
		[OperationContract]
		List<Vendor> GetAllVendor();
		//Lay thong tin du lieu cua Vendor theo id
		[OperationContract]
		Vendor GetItemByIdVendor(object id);
		#endregion

	}
}
